package com.usefullc.common.util;

import cn.hutool.core.date.DateTime;
import cn.hutool.core.date.DateUtil;

import java.util.Date;

/**
 * @author: Sampson
 * @date: 2022-10-15 16:07
 */
public class DateTimeUtils {

    public static void main(String[] args) {
        Date now = new Date();
        DateTime dateTime = DateUtil.beginOfDay(now);
        System.out.println(dateTime);
        System.out.println(DateUtil.beginOfMonth(now));
        System.out.println(DateUtil.beginOfQuarter(now));
        System.out.println(DateUtil.beginOfYear(now));
        System.out.println(DateUtil.beginOfWeek(now));
        System.out.println(DateUtil.endOfDay(now));
        System.out.println(DateUtil.date());
    }
}
